package direct;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.PutMethod;

import javax.net.ssl.HttpsURLConnection;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;

public class DirectTest {
    public static void main(String[] args) throws IOException {
//        HttpClient httpclient = new HttpClient();
//        PostMethod httpPost = new PostMethod("https://soap.direct.yandex.ru/json-api/v4/");
//        try {
//            httpclient.executeMethod(httpPost);
//            System.out.println(httpPost.getStatusLine());
//        } finally {
//            httpPost.releaseConnection();
//        }
        URL url = new URL("https://soap.direct.yandex.ru/json-api/v4/");
        URLConnection conn = url.openConnection();
        if (conn instanceof HttpsURLConnection) {
            System.out.println("yes");
        }
    }
}
